fix(FR-2583): update cached access key in client config after switching main keypair#6621
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
Updates the WebUI keypair management flow to immediately refresh the cached Backend.AI client access key after a successful “switch main keypair” mutation, avoiding stale key usage across components/hooks that read baiClient._config.accessKey.
Changes:
- Mutates
globalThis.backendaiclient._config.accessKeyonswitchMyMainAccessKeycompletion. - Keeps existing refetch + success notification behavior after switching the main key.
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 8.59% | 1757/20454 |
| 🔴 | Branches | 7.87% | 1131/14373 |
| 🔴 | Functions | 5.14% | 285/5547 |
| 🔴 | Lines | 8.31% | 1649/19844 |
Test suite run success
856 tests passing in 39 suites.
Report generated by 🧪jest coverage report action from 2b2fe60
c97ae0f to
ade188d
Compare
ade188d to
71ad453
Compare
nowgnuesLee
left a comment
There was a problem hiding this comment.
Please create a jira issue and link the jira issue.
|
Created Jira issue FR-2583 and linked it in the PR description. |
71ad453 to
908ce95
Compare
Merge activity
|
…ng main keypair (#6621) Resolves #6620 (FR-2583) ## Summary - After switching main access key, show a modal informing the user that re-login is required - On confirm, trigger logout via `backend-ai-logout` event to ensure all cached credentials are refreshed - Add i18n translations for `ReLoginRequired` and `MainKeyChangedNeedRelogin` keys (21 languages) ## Test plan - [ ] Switch main access key via keypair management modal - [ ] Verify info modal appears with re-login message - [ ] Confirm modal cannot be dismissed without clicking the confirm button - [ ] Click confirm and verify logout + redirect to login page <img width="439" height="179" alt="image" src="https://github.com/user-attachments/assets/054b6428-ffd6-4929-9c28-4ac82d806738" />
908ce95 to
2b2fe60
Compare

Resolves #6620 (FR-2583)
Summary
backend-ai-logoutevent to ensure all cached credentials are refreshedReLoginRequiredandMainKeyChangedNeedReloginkeys (21 languages)Test plan